﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using HWEngine;
using HWEngine.Configuration;

namespace HandWriter
{
	public class ActionManager
	{
		private Stack<string> _states = new Stack<string>();

		public ActionManager()
		{
		}

		public void Push(Letter l)
		{
			_states.Push(Serializer.Serialize(l));
		}

		public Letter Pop()
		{
			Letter l = Serializer.Deserialize<Letter>(_states.Pop());
			return l;
		}

		public bool Empty
		{
			get { return _states.Count == 0; }
		}
	}
}
